package com.sdweizan.sdk.bytedance.bean.settle;

import com.alibaba.fastjson.annotation.JSONField;
import com.sdweizan.sdk.bytedance.bean.BdBaseResponse;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@NoArgsConstructor
@Data
public class BdUnsettleAmountResponse extends BdBaseResponse {
  @JSONField(name = "data")
  private Data data;

  @NoArgsConstructor
  @lombok.Data
  public static class Data {
    @JSONField(name = "out_order_no")
    private String outOrderNo;

    @JSONField(name = "unsettle_amount")
    private Long unsettleAmount;

    @JSONField(name = "detail")
    private Detail detail;

    @NoArgsConstructor
    @lombok.Data
    public static class Detail {
      @JSONField(name = "pay_info")
      private PayInfo payInfo;

      @JSONField(name = "refund_info")
      private List<RefundInfo> refundInfo;
      // 平台支付手续费金额，单位为分
      @JSONField(name = "payment_rake")
      private Long paymentRake;
      // 平台行业抽佣金额，单位为分
      @JSONField(name = "life_rake")
      private Long lifeRake;
      // 平台达人分佣金额，单位为分
      @JSONField(name = "commission")
      private Long commission;

      @NoArgsConstructor
      @lombok.Data
      public static class PayInfo {
        @JSONField(name = "out_order_no")
        private String outOrderNo;
        // 支付单总金额
        @JSONField(name = "amount")
        private Long amount;
      }

      @NoArgsConstructor
      @lombok.Data
      public static class RefundInfo {
        @JSONField(name = "out_refund_no")
        private String outRefundNo;
        // 退款单总金额
        @JSONField(name = "amount")
        private Long amount;
      }
    }
  }
}
